package com.qianli.user.service.impl;

import com.fqgj.xjd.user.dao.UserBehaviorDeviceDao;
import com.fqgj.xjd.user.entity.UserBehaviorDeviceEntity;
import com.qianli.user.ro.behavior.UserBehaviorDeviceRO;
import com.qianli.user.service.UserBehaviorService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * name:行为信息查询
 * auth:ting.li@qianli-inc.com
 * date:2018/2/26 14:41
 * version: v1.0.0
 **/
@Service
public class UserBehaviorServiceImpl implements UserBehaviorService {

    @Autowired
    private UserBehaviorDeviceDao userBehaviorDeviceDao;

    /**
     * 查询用户指定设备信息
     *
     * @param userDevice
     * @return
     */
    @Override
    public UserBehaviorDeviceRO getUserBehaviorDeviceByUserCodeAndGuestId(UserBehaviorDeviceRO userDevice) {
        UserBehaviorDeviceEntity entity = userBehaviorDeviceDao.selectDeviceByUserCode(userDevice.getUserCode());
        if (null == entity) {
            return null;
        }
        return userDevice;
    }
}
